﻿using Ue.Infrastructure.DomainBase;

namespace Ue.Qcdz.Domain.Products
{
    public class Product : EntityBase
    {
        public Product(object key)
            : base(key)
        {
        }
        public Product(string title, string iamgeUrl, string link, EntityState state, object key)
            : base(key)
        {
            this.ProductTitle = title;
            this.ProductImageUrl = iamgeUrl;
            this.ProductLink = link;
            State = state;
        }

        public string ProductTitle { get; private set; }
        public string ProductImageUrl { get; private set; }
        public string ProductLink { get; private set; }
        public EntityState State { get; private set; }
        public void ChangeState()
        {
            
            State = State == EntityState.Disable ? EntityState.Enable : EntityState.Disable;
        }
    }
}
